#ifndef _CTOOLTIP_H_
#define _CTOOLTIP_H_

#include <buola/gui/cwindow.h>
#include <buola/image/ctextlayout.h>

namespace buola { namespace gui {

class CToolTip : public CWindow
{
public:
    CToolTip(const std::wstring &pCaption=std::wstring());
    ~CToolTip();

    void RePos();

    //! sets the caption to display for the box
    void SetCaption(const std::wstring &pCaption);
    
    //! returns the caption to display for the box
    const std::wstring &Caption()    {   return mCaption;    }

protected:
    void Shape();

public:
////////////// Event handling //////////////
    virtual void OnExpose(const CExposeEvent &pE);
    virtual void OnMouseMove(const CMouseEvent &pE);
    virtual void OnMouseOut(const CMouseEvent &pE);

protected:
    img::CTextLayout mTextLayout;
    img::PFont mFont;
    std::wstring mCaption;
    
////////////////// static data //////////////////
};

/*namespace gui*/ } /*namespace buola*/ }

#endif
